﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
using Common;

public partial class Business_Business_View : System.Web.UI.Page
{
    protected int NewsKey;
    protected string DanNum;


    protected Dat_News news;

    protected void Page_Load(object sender, EventArgs e)
    {
        NewsKey = string.IsNullOrEmpty(Request["NewsKey"]) ? 0 : Convert.ToInt32(Request["NewsKey"]);
        DanNum = string.IsNullOrEmpty(Request["DanNum"]) ? "" : Request["DanNum"].ToString().Trim();

        if (NewsKey == 0 && DanNum == "")
            NewsKey = 0;
        
        if ( NewsKey == 0 && DanNum != "")
            NewsKey = new News().GetNewKeyByDanNum(DanNum);

        news = new News().SelectNews(NewsKey);

        if (news.Type == 5 || news.Type == 6) tb_Do.Visible = true;

        TechFivTime.Text = news.TechFiveTime.ToString();
        TechSixTime.Text = news.TechSixTime.ToString();

    }

}
